.row.panel-body
  .col-sm-5.col-lg-3
    button.btn.btn-block.btn-primary.visible-xs.push[data-toggle="collapse" data-target="#inbox-nav" type="button"]
      | Navigation
    #inbox-nav.collapse.navbar-collapse.remove-padding
      .block
        .block-header.bg-gray-lighter
          /ul.block-options
          /  li
          /    button[data-toggle="modal" data-target="#modal-compose" type="button"]
          /      i.fa.fa-pencil
          /      |  New Message
          h3.block-title
            | 消息中心
        .block-content
          ul.nav.nav-pills.nav-stacked.push
            - @msg_keys.each do |key|
              - info = @msg_menu_infos[key]
              li(class="#{'active' if params[:msg_type]==key}")
                a[href="#{base_notices_path(msg_type: key)}"]
                  span.badge.pull-right= info['count']
                  i.fa.fa-fw.push-5-r(class="#{info['icon']}")
                  = info['text']
  .col-sm-7.col-lg-9
    .block
      .block-header.bg-gray-lighter

        ul.block-options
          li
            a.js-tooltip[title="" type="button" data-toggle="block-option" data-original-title="上一页" href="#{path_to_prev_page @notices}"]
              i.si.si-arrow-left
          li
            a.js-tooltip[title="" type="button" data-toggle="block-option" data-original-title="下一页" href="#{path_to_next_page @notices}"]
              i.si.si-arrow-right
          li
            button.refresh-msg-page[type="button"]
              i.si.si-refresh
          li
            button[type="button" data-toggle="block-option" data-action="fullscreen_toggle"]
              i.si.si-size-fullscreen
        .block-title.text-normal
          = page_entries_info @notices
      .block-content
        .push
          - if params[:msg_type].in? %w[unread readed]
            a.btn.btn-default.pull-right[href='#' style="position: relative;display: inline-block;"]
              i.fa.fa-times.text-danger.push-5-l.push-5-r
              span.hidden-xs 删除
          .btn-group
            - if params[:msg_type].in? %w[unread]
              a.btn.btn-default[href='#']
                i.fa.fa-archive.text-primary.push-5-l.push-5-r
                span.hidden-xs 标记已读
              a.btn.btn-default[data-confirm='确定要标记当页所有的消息已读？' href='#']
                i.fa.fa-star.text-warning.push-5-l.push-5-r
                span.hidden-xs 标记所有消息为已读
        .pull-r-l
          table.js-table-checkable.table.table-hover.table-vcenter
            tbody
              - @notices.each do |notice|
                tr
                  td.text-center[style="width: 70px;"]
                    label.css-input.css-checkbox.css-checkbox-primary
                      input[type="checkbox"]
                      span
                  td.hidden-xs.font-w600[style="width: 140px;"]
                    = params[:msg_type]=='sent' ? notice.receiver : (notice.sender||'system')
                  td
                    = link_to_dialog notice.title, notice
                    .text-muted.push-5-t
                      == notice.content
                  td.visible-lg.text-muted[style="width: 120px;"]
                    em= notice.created_at.label

javascript:
  $('.refresh-msg-page').click(function(){
    Turbolinks.visit('#{request.url}')
  })